unit Unit4;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TForm4 = class(TForm)
    Button1:TButton;
    Button2:TButton;
    Label1:TLabel;
    Label2:TLabel;
    Label3:TLabel;
    Label4:TLabel;
    GroupBox1:TGroupBox;
    SaveDialog1:TSaveDialog;
    Button3: TButton;
    procedure Button2Click(Sender: TObject);
    procedure Button1Click(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure FormShow(Sender: TObject);
    procedure Button3Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form4: TForm4;
  Dir: String;

implementation

uses Unit3, Unit5;

{$R *.dfm}

procedure TForm4.Button1Click(Sender: TObject);
begin
  Close;
end;

procedure TForm4.Button2Click(Sender: TObject);
begin
  Form3.ShowModal;
end;

procedure TForm4.FormCreate(Sender: TObject);
begin
  Dir:=ExtractFilePath(paramstr(0));
end;

procedure TForm4.FormShow(Sender: TObject);
begin
  if FileExists(Dir+'Keyset\private.rsa') then
    Label2.Caption := Dir+'Keyset\private.rsa';
  if FileExists(Dir+'Keyset\public.rsa') then
    Label4.Caption := Dir+'Keyset\public.rsa';

  Label2.Width:=255;
  Label4.Width:=255;
end;

procedure TForm4.Button3Click(Sender: TObject);
begin
  Form5.ShowModal;
end;

end.
